@extends('mbcore.baseadmin::layout.iframe')
@section('title', $subtitle)

@section('content')
    <style>
        .radio label{width:60px;}

        div{
            width:100%;
        }
        .radio label{
            width:60px;
        }
        .required_field{
            color:red;
        }
    </style>
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">

                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>{{ $subtitle }}</h5>
                    </div>
                    <div class="ibox-content">
                        {{--<form  class="form-horizontal" action="{{route('admin.platform.manager.add')}}" method="post">--}}
                        {!! Form::open(['enctype'=>'multipart/form-data','class'=>'form-horizontal']) !!}

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
{{--                                <span style="color:red;">*</span>--}}
                                评论用户
                            </label>
                            <div class="col-sm-10">
                                <label>
                                    <input type="text" class="form-control"   value="{{$data['username']}}" readonly="readonly">
                                </label>
                            </div>
                        </div>


                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
{{--                                <span style="color:red;">*</span>--}}
                                评论内容
                            </label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" value="{{ $data['comment'] }}" readonly="readonly">

                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                {{--                                <span style="color:red;">*</span>--}}
                                评论时间
                            </label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" value="{{ $data['created_at'] }}" readonly="readonly">

                            </div>
                        </div>
{{--                        <div class="hr-line-dashed"></div>--}}
{{--                        <div class="form-group">--}}
{{--                            <label class="col-sm-2 control-label ">--}}
{{--                                排序--}}
{{--                            </label>--}}
{{--                            <div class="col-sm-10">--}}
{{--                                <input type="number" class="form-control" value="{{ $data['sort'] }}" readonly="readonly">--}}
{{--                            </div>--}}
{{--                        </div>--}}


                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                审核结果
                            </label>
                            <div class="col-sm-10">
                                <div class="radio">
                                    <label>
                                        <input value="2"  name="status" type="radio" checked>通过</label>
                                    <label>
                                        <input value="3"  name="status" type="radio">拒绝</label>
                                </div>
                            </div>
                        </div>

                        <div class="remark">
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">
                                    {{--                                <span style="color:red;">*</span>--}}
                                    备注或拒绝原因
                                </label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" value="{{ old('remark',$data['remark']??null) }}" name="remark">
                                </div>
                            </div>
                        </div>

                        @include('common.alert_error')

                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button class="btn btn-primary" type="submit">提交</button>
                            </div>
                        </div>
                        {{ csrf_field() }}
{{--                        <input type="hidden"  name="roles" value="center">--}}
                        {!! Form::close() !!}
                    </div>
                </div>
            </div>
        </div>
    </div>
@stop
@section('myscript')
    <script src="{{ config('mbcore_baseadmin.baseadmin_assets_path')}}/js/plugins/layer/laydate/laydate.js"></script>
    <script src="{{ config('mbcore_baseadmin.baseadmin_assets_path')}}/js/plugins/validate/jquery.validate.min.js"></script>
    <script src="{{ config('mbcore_baseadmin.baseadmin_assets_path')}}/js/plugins/validate/messages_zh.min.js"></script>
{{--    @include('common.update_success_prompt_js',$params);--}}
    <script>
        $(document).ready(function () {
            @if( count($errors)==1 && $errors->all()[0] == $params['success'])
            swal({
                title: "操作成功！",
                text: "2秒后自动关闭。",
                type: "success",
                timer: 2000,
                showConfirmButton: false
            },function(){
                var index=parent.layer.getFrameIndex(window.name);
                // console.log(index);
                parent.layer.close(index);
            });
            @endif
        });
    </script>
@stop
